﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<title></title>
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
	<style type="text/css">
		html,body{height:100%;}
		.Absolute-Center {
		  margin: auto;
		  height:150px;
		  width:80%;
		  background:#40966e;
		  color:#fff;
		  text-align:center;
		  line-height:150px;
		  margin-bottom:10px;
		}
		#bbb{background:#c6396d;}
		.test{background:#454545;}
		.test1{background:#502145;}
	</style>
</head>
<body>
	<div class="Absolute-Center" id="aaa">#aaa</div>
	<div class="Absolute-Center" id="bbb">#bbb</div>
	<div class="Absolute-Center test">.test</div>
	<div class="Absolute-Center test test1">.test1</div>
	<script type="text/javascript" src="../../js/swipe.js"></script>
	<script type="text/javascript" src="../../js/jquery-2.1.0.min.js"></script>
	<script type="text/javascript">
		
		Y('#aaa').on("swipe",
			{
				"leftCallback" : function(){
					console.log("左滑0"+$(this).html());
				},
				"rightCallback" : function(){
					console.log("右滑0"+$(this).html());
				}
			}
		);
		Y('#bbb').on("tap",
			{
				"shortCallback" : function(){
					console.log("按1"+$(this).html());
				},
				"longCallback" : function(){
					console.log("长按1"+$(this).html());
				}
			}
		);
		Y('.test1').on("tap",
			{
				"shortCallback" : function(){
					console.log("按1"+$(this).html());
				},
				"longCallback" : function(){
					console.log("长按1"+$(this).html());
				}
			}
		);
		Y('.test').on("swipe",
			{
				"leftCallback" : function(){
					console.log("左滑"+$(this).html());
				},
				"rightCallback" : function(){
					console.log("右滑"+$(this).html());
				}
			}
		);
	</script>
</body>
</html>